<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:profile="http://www.contact.core.profile.com/contacts/core/profile/ui"
      xmlns:c="http://java.sun.com/jstl/core">

<ui:component>
   <a4j:region selfRendered="true">
        <h:form>
            <a4j:poll action="#{wallSessionBean.checkGeneralWall}" reRender="changedGeneralWall" interval="10000" ajaxSingle="true" limitToList="true"/>
            <a4j:outputPanel layout="none">
                <rich:panel id="changedGeneralWall" bodyClass="rich-laguna-panel-no-header" style="display:#{wallSessionBean.profileChanged gt 0 ? 'block' : 'none'};">
                    <h:outputText value="#{wallSessionBean.profileChanged} #{resources.wallNewComments}" />
                       <a4j:commandLink reRender="commentOnGeneralWall, changedGeneralWall}" value="#{resources.wallReload}" style="float:right;"/>
                </rich:panel>
            </a4j:outputPanel>
        </h:form>
    </a4j:region>
    <h:form>
          <profile:wallEdit reRender="commentOnGeneralWall"/>
    </h:form>
    <!--<rich:separator height="1px" width="100%"/>-->

    <a4j:outputPanel id="commentOnGeneralWall">
        <c:forEach items="#{wallSessionBean.groupWallComments}" var="wallData" varStatus="i">
            <a4j:form id="wall_key#{i.index}">
                <profile:wallPost wallData="#{wallData}"
                                  reRender="commentOnGeneralWall"
                                  index="#{i.index}"
                        />
            </a4j:form>

            <rich:separator width="100%" height="1px"/>
        </c:forEach>
    </a4j:outputPanel>


</ui:component>


</html>


